package com.wind.Model01_创建模式.创建模式01_单利模式$Singleton.设计模式;

import org.junit.Test;

public class ModelTest {
    @Test
    public void test01() {
        HungrySingleton instance01 = HungrySingleton.getInstance();
        HungrySingleton instance02 = HungrySingleton.getInstance();
        System.out.println(instance01); //HungrySingleton@61e4705b
        System.out.println(instance02); //HungrySingleton@61e4705b

        LazySingleton instance11 = LazySingleton.getInstance();
        LazySingleton instance12 = LazySingleton.getInstance();
        System.out.println(instance11); //LazySingleton@50134894
        System.out.println(instance12); //LazySingleton@50134894
    }
}
